students=[
    {'name':'张三','age':20},
    {'name':'吕浩颖','age':18},
    {'name':'孙军乐','age':21}
]
def select_student():
    name=input('输入名字')
    ok=False
    for itme in students:
        if itme.get('name')==name:
            print(f"查找姓名为{itme['name']}年龄为{itme.get('age')}")
            ok=False
            break

    if ok == False:
            print(f'{name}没有找到')
select_student()
